<?php


namespace app\repository;


use app\model\WebsocketMsg;

class WebsocketLogsRepository extends Repository
{

    public function list($data)
    {
        $builder = WebsocketMsg::query();
        $count = $builder->count();
        $collection = $builder->limit($data['page_size'])->offset($data['page_size'] * ($data['page_no'] - 1))->get();
        return $this->success([
            "page_no"=>$data['page_no'],
            "page_size"=>$data['page_size'],
            "list"=>$collection,
            "count"=>$count
        ]);
    }

}